#ifndef CMATERIAL_H_
#define CMATERIAL_H_

#include <cstring>
#include "ccolor.h"

using namespace std;

/**
 * CMaterial - class representing material of mesh(es)
 * @author Michal Rost
 * @date 15.07.2007
 */
class CMaterial : public CObject {
public:
  CMaterial() {}
  void setStrName(string strName);
  void setStrTextureFileName(string strTextureFileName);
  void setAmbient(CColor ambient);
  void setDiffuse(CColor diffuse);
  void setSpecular(CColor specular);
  void setShininess(short shininess);
  void setTransparency(short transparency);
  void setTextureId(TIndex textureId);
  void setTileU(float tileU);
  void setTileV(float tileV);
  void setOffsetU(float offsetU);
  void setOffsetV(float offsetV);
  string getStrName() const;
  string getStrTextureFileName() const;
  CColor getAmbient() const;
  CColor getDiffuse() const;
  CColor getSpecular() const;
  short getShininess() const;
  short getTransparency() const;
  bool isTextureProvided() const;
  int getTextureId() const;
  float getTileU() const;
  float getTileV() const;
  float getOffsetU() const;
  float getOffsetV() const;
  static string getClassName() {
    return "CMaterial";
  }
protected:
  bool textureProvided;
  string strName;
  string strTextureFileName;
  CColor ambient;
  CColor diffuse;
  CColor specular;
  short shininess;
  short transparency;
  int textureId;
  float tileU;
  float tileV;
  float offsetU;
  float offsetV;
};

#endif
